package com.example.myhelloworld.client;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HorizontalPanel;

public class AddExercises extends ExerciseClass {

	public AddExercises(String uName, String settings, GreetingServiceAsync GSA) {
		super(uName, settings, GSA);
		
		
		selfPanel = new HorizontalPanel();
		selfPanel.addStyleName("ExerciseBasic");
		produceResultButton = new Button("Close"); 
		selfPanel.add(produceResultButton);
		Button addExercises = new Button("Add basic set of exercises");
		selfPanel.add(addExercises);
		addExercises.addClickHandler(new ClickHandler(){

			public void onClick(ClickEvent event) {
				gsa.fillDataBaseExercises(new AsyncCallback<String>(){
					public void onFailure(Throwable caught) {}
					public void onSuccess(String result) {}});
			}});
	}

	@Override
	public void draw() {
		
	}

	@Override
	public String pushresult() {
		return "";
	}

	
	
}
